﻿<Window x:Class="BestCode.Creds.View.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="358.187" Width="937.199">
    <Grid>
        <Button Content="Generar" HorizontalAlignment="Left" Margin="250,10,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click" Height="49"/>
        <ComboBox HorizontalAlignment="Left" Margin="62,10,0,0" VerticalAlignment="Top" Width="167" SelectedItem="{Binding SelectedCourse, Mode=TwoWay}" ItemsSource="{Binding Courses, Mode=TwoWay}"/>
        <DataGrid Margin="10,65,10,10" AutoGenerateColumns="false" ItemsSource="{Binding Students, Mode=TwoWay}">
            <DataGrid.Columns>
                <DataGridTextColumn Header="Codigo" Binding="{Binding Codigo}"/>
                <DataGridTextColumn Header="Nombres" Binding="{Binding Nombres}"/>
                <DataGridTextColumn Header="Ap. Paterno" Binding="{Binding ApellidoPaterno}"/>
                <DataGridTextColumn Header="Ap. Materno" Binding="{Binding ApellidoMaterno}"/>
                <DataGridTextColumn Header="Calle" Binding="{Binding Calle}"/>
                <DataGridTextColumn Header="NumDireccion" Binding="{Binding NumDireccion}"/>
                <DataGridTextColumn Header="Zona" Binding="{Binding Zona}"/>
                <DataGridTextColumn Header="Cod Foto" Binding="{Binding Foto}"/>
                <DataGridTemplateColumn Width="*" Header="Habilitado">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <Grid>
                                <CheckBox HorizontalAlignment="Center"  IsChecked="{Binding Habilitado, Mode=TwoWay}"/>
                            </Grid>
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
                <DataGridTemplateColumn Width="*" Header="Acciones">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <Grid>
                                <Button Click="ButtonBase_OnClick">Actualizar</Button>
                            </Grid>
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>



            </DataGrid.Columns>
        </DataGrid>

        <TextBlock HorizontalAlignment="Left" Margin="10,14,0,0" TextWrapping="Wrap" Text="Curso :" VerticalAlignment="Top"/>
        <TextBlock HorizontalAlignment="Left" Margin="339,40,0,0" TextWrapping="Wrap" Text="Destino :" VerticalAlignment="Top"/>
        <TextBox HorizontalAlignment="Left" Height="23" Margin="393,36,0,0" TextWrapping="Wrap" Text="{Binding OutputFolder, Mode=TwoWay}" VerticalAlignment="Top" Width="251"/>
        <TextBox HorizontalAlignment="Left" Height="23" Margin="62,37,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="167" KeyUp="TextBox_KeyUp" Name="txtFilter"/>
        <Button Content="Abrir" HorizontalAlignment="Left" Height="23" Margin="719,36,0,0" VerticalAlignment="Top" Width="59" Click="OpenOutputFolder"/>
        <TextBlock HorizontalAlignment="Left" Margin="339,14,0,0" TextWrapping="Wrap" Text="Fotos :" VerticalAlignment="Top"/>
        <TextBox Height="23" Margin="393,10,0,0" TextWrapping="Wrap" Text="{Binding PicturesFolder, Mode=TwoWay}" VerticalAlignment="Top" HorizontalAlignment="Left" Width="321"/>
        <Button Content="........." HorizontalAlignment="Left" Height="23" Margin="719,10,0,0" VerticalAlignment="Top" Width="59" Click="SetPicturesFolder"/>
        <Button Content="..........." HorizontalAlignment="Left" Margin="649,36,0,0" VerticalAlignment="Top" Width="65" Height="24" Click="Button_Click_1"/>
        <TextBlock HorizontalAlignment="Left" Margin="799,29,0,0" TextWrapping="Wrap" Text="{Binding StudentsCount, Mode=TwoWay}" VerticalAlignment="Top" FontSize="24" FontWeight="Bold" RenderTransformOrigin="0.5,0.5" Width="50"/>
        <CheckBox Content="Template Primaria" Name="chkTemplatePrimaria" HorizontalAlignment="Left" Margin="799,14,0,0" VerticalAlignment="Top" IsChecked="{Binding IsPrimaryTemplate, Mode=TwoWay}"/>
        <Button Content="PRINT" HorizontalAlignment="Left" Margin="868,36,0,0" VerticalAlignment="Top" Width="51" Height="24" Name="btnPrint" Click="btnPrint_Click"/>

    </Grid>
</Window>
